<?php include $this->admin_tpl('meta');?>
<title>基础</title>
</head>
<body>
<div class="page-container">
	<div class="cl tb-top"> <span class="l">
		<a href="javascript:;" onclick="yzm_open('添加字段','<?php echo U('diy_field',['action'=>'add','id'=>$_GET['id']]);?>','600','550')" class="btn btn-primary radius"><i class="yzm-iconfont yzm-icontianjia"></i> 添加字段</a>
	</span></div>
	<table class="table table-border table-bg table-hover">
		<thead>
			<tr class="text-c">
				<th>排序</th>
				<th>字段标题</th>
				<th>字段名称</th>
				<th>是否搜索</th>
				<th>是否可排序</th>
				<th>宽度</th>
				<th>是否求和</th>
				<th>是否可编辑</th>
				<th>管理操作</th>
			</tr>
		</thead>
		<tbody>
			<?php 
			   foreach($data as $key=>$val){
			 ?>
			<tr class="text-c">
				<td><?php echo $val['id'];?></td>
				<td><?php echo $val['title'];?></td>
				<td><?php echo $key;?></td>
				<td><?php echo $val['search']?'是':'否';?></td>
				<td><?php echo $val['sort']?'是':'否';?></td>
				<td><?php echo $val['width'];?></td>
				<td><?php echo $val['totalRow']?'是':'否';?></td>
				<td><?php echo $val['edit']?'是':'否';?></td>
				<td class="td-manage">
					<a title="编辑"  class="btn-mini btn-success ml-5" href="javascript:;" onclick="yzm_open('编辑表格','<?php echo U('diy_field',array('id'=>$_GET['id'],'field'=>$key,'action'=>'edit'));?>','600','550')" style="text-decoration:none">编辑</a>
					<a title="删除" href="javascript:;" onclick="yzm_confirm('<?php echo U('diy_field',array('id'=>$_GET['id'],'field'=>$key,'action'=>'del'));?>', '确定要删除【<?php echo $val['title'];?>】字段吗？<br><span style=\'color:#ee3b3b\'><span class=\'yzm-iconfont yzm-iconshuoming\'></span> 删除已有数据该字段！</span>',1,0)"  class="btn-mini btn-danger ml-5" style="text-decoration:none">删除</a>
				</td>
			</tr>
			<?php 
			   }		 
			?>	
		</tbody>
	</table>
	<?php if(!$data){ ?><div class="yzm_no_data"><i class="yzm-iconfont yzm-iconshuoming"></i> 暂无数据</div><?php } ?>
</div>
<?php include $this->admin_tpl('footer');?>
</body>
</html>